package com.ai.wx.entity;

// Generated 2015-5-21 9:58:27 by Hibernate Tools 4.0.0

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import com.ai.core.util.Arith;

/**
 * AgentBrokerage generated by hbm2java
 */
@Entity
@Table(name = "agent_brokerage", catalog = "wx", uniqueConstraints = @UniqueConstraint(columnNames = "agent_id"))
public class AgentBrokerage implements java.io.Serializable {

	private Integer id;
	private Integer agentId;
	private Integer charge;
	private Integer yesterdayCharge;
	private Integer lockCharge;
	private Integer totalCharge;
	private Integer totalDram;
	private Integer state;
	private Date crtDate;
	private Date modDate;
	private String crtUid;
	private String modUid;

	public AgentBrokerage() {
	}

	public AgentBrokerage(Integer agentId, Integer charge, Integer yesterdayCharge, Integer lockCharge, Integer totalCharge, Integer totalDram, Integer state, Date crtDate, Date modDate, String crtUid, String modUid) {
		this.agentId = agentId;
		this.charge = charge;
		this.yesterdayCharge = yesterdayCharge;
		this.lockCharge = lockCharge;
		this.totalCharge = totalCharge;
		this.totalDram = totalDram;
		this.state = state;
		this.crtDate = crtDate;
		this.modDate = modDate;
		this.crtUid = crtUid;
		this.modUid = modUid;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "Id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "agent_id", unique = true)
	public Integer getAgentId() {
		return this.agentId;
	}

	public void setAgentId(Integer agentId) {
		this.agentId = agentId;
	}

	@Column(name = "charge")
	public Integer getCharge() {
		return this.charge;
	}

	@Transient
	public double getDCharge() {
		return Arith.div100(charge);  
	}
	
	public void setCharge(Integer charge) {
		this.charge = charge;
	}

	@Column(name = "yesterday_charge")
	public Integer getYesterdayCharge() {
		return this.yesterdayCharge;
	}
	
	@Transient
	public double getDYesterdayCharge() {
		return Arith.div100(yesterdayCharge);  
	}

	public void setYesterdayCharge(Integer yesterdayCharge) {
		this.yesterdayCharge = yesterdayCharge;
	}

	@Column(name = "lock_charge")
	public Integer getLockCharge() {
		return this.lockCharge;
	}


	@Transient
	public double getDLockCharge() {
		return Arith.div100(lockCharge);
	}

	
	public void setLockCharge(Integer lockCharge) {
		this.lockCharge = lockCharge;
	}

	@Column(name = "total_charge")
	public Integer getTotalCharge() {
		return this.totalCharge;
	}

	@Transient
	public double getDTotalCharge() {
		return Arith.div100(totalCharge);  
	}

	public void setTotalCharge(Integer totalCharge) {
		this.totalCharge = totalCharge;
	}

	@Column(name = "total_dram")
	public Integer getTotalDram() {
		return this.totalDram;
	}


	@Transient
	public double getDTotalDram() {
		return Arith.div100(totalDram);  
	}
	public void setTotalDram(Integer totalDram) {
		this.totalDram = totalDram;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "crt_date", length = 0)
	public Date getCrtDate() {
		return this.crtDate;
	}

	public void setCrtDate(Date crtDate) {
		this.crtDate = crtDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "mod_date", length = 0)
	public Date getModDate() {
		return this.modDate;
	}

	public void setModDate(Date modDate) {
		this.modDate = modDate;
	}

	@Column(name = "crt_uid")
	public String getCrtUid() {
		return this.crtUid;
	}

	public void setCrtUid(String crtUid) {
		this.crtUid = crtUid;
	}

	@Column(name = "mod_uid")
	public String getModUid() {
		return this.modUid;
	}

	public void setModUid(String modUid) {
		this.modUid = modUid;
	}

}
